<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
	
</script>
<style type="text/css">
body {
	background-image: url('../images/backgrond.jpg');
}

button {
	width: 120px;
	height: 30px;
	color: red;
	text-shadow: 5px 5px 5px #FF0000;
}

h2 {
	text-shadow: 5px 5px 5px #FF0000;
	color: #900000;
	font: italic bold 20px serif;
	text-align:center;
}

h3 {
	text-shadow: 5px 5px 5px #FF0000;
	color: #900000;
	font: italic bold 20px serif;
	text-align:left;
}
fieldset {
	text-shadow: 2px 2px 2px #99FF99;
	font: italic bold 12px/30px Georgia, serif;
}

p{
	text-shadow: 5px 5px 5px #FF0000;
	color: #900000;
	font: italic bold 20px serif;
	text-align:center;
 }
h6{
	text-align:center
	
}
table {
	table-layout: auto;
}

</style>
<script type="text/javascript">
 	/* person */	
	function editConfirm_p(id) {
		var r = confirm("Do you want to edit this item?");
		if (r) {
			window.location.href = "/Spring_MVC/manager/editPerson.do?id=" + id;
		}
	}
 	function deleteConfirm_p(id) {
		var r = confirm("Do you want to delete this item?");
		if (r) {
			window.location.href = "/Spring_MVC/manager/deletePersonTrue.do?id=" + id;
		}
	}
 	/* Incident */
	function editConfirm_i(id) {
		var r = confirm("Do you want to edit this item?");
		if (r) {
			window.location.href = "/Spring_MVC/manager/editIncident.do?id=" + id;
		}
	}
 	function deleteConfirm_i(id) {
		var r = confirm("Do you want to delete this item?");
		if (r) {
			window.location.href = "/Spring_MVC/manager/deleteIncidentTrue.do?id=" + id;
		}
	}
 	/* plan */
	function editConfirm_pl(id) {
		var r = confirm("Do you want to edit this item?");
		if (r) {
			window.location.href = "/Spring_MVC/manager/editPlan.do?id=" + id;
		}
	}
 	function deleteConfirm_pl(id) {
		var r = confirm("Do you want to delete this item?");
		if (r) {
			window.location.href = "/Spring_MVC/manager/deletePlanTrue.do?id=" + id;
		}
	}
 	
 	
 </script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>


<body>
<div id="infoPage">
	<h2>WHICH TABLE DO YOU WANT TO UPDATE?</h2>
	<div id="page-title" class="clearfix">
		<div class="icon_img">
			<img src="../images/nyt5.gif" width="35" height="35"> <img
				src="../images/nyt1.gif" width="35" height="35"> <img
				src="../images/nyt4.gif" width="35" height="35"> <img
				src="../images/nyt7.gif" width="35" height="35">
		</div>
	</div>
	</div>
	<hr>
	
	<div>
		<table border="1" width="88%" id="P">
		<h3>PERSON INFO</h3>
			<tr>
				<td width="100"><b>ID</b></td>
				<td width="100"><b>First_name</b></td>
				<td width="100"><b>Last_name</b></td>
				<td width="100"><b>Position</b></td>
				<td width="100"><b>Contact_Phone</b></td>
				<td width="100"><b>Contact_Email</b></td>
				<td width="100"><b>Age</b></td>
				<td width="100"><b>Sex</b></td>
				<td width="100">Edit Item</td>
				<td width="100">Delete Item</td>
			</tr>
			<c:forEach items="${person}" var="person">
				<tr>
					<td>${person.id}</td>
					<td>${person.f_name}</td>
					<td>${person.l_name}</td>
					<td>${person.position}</td>
					<td>${person.phone}</td>
					<td>${person.email}</td>
					<td>${person.age}</td>
					<td>${person.sex}</td>
					<td>
						<a href="javascript:editConfirm_p(${person.id})">Edit</a>
					</td>
					<td>
						<a href="javascript:deleteConfirm_p(${person.id})">Delete</a>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>

	<div>
		<table border="1" width="88%" id="I">
		<h3>INCIDENT INFO</h3>
			<tr>
				<td width="100"><b>ID</b></td>
				<td width="100"><b>incident_location</b></td>
				<td width="100"><b>General_incident_description</b></td>
				<td width="150"><b>captured_initials_of_reporting_individual</b></td>
				<td width="100">Edit Item</td>
				<td width="100">Delete Item</td>
			</tr>
			<c:forEach items="${incident}" var="incident">
				<tr>
					<td>${incident.id}</td>
					<td>${incident.location}</td>
					<td>${incident.des}</td>
					<td>${incident.init}</td>
					<td>
						<a href="javascript:editConfirm_i(${incident.id})">Edit</a>
					</td>
					<td>
						<a href="javascript:deleteConfirm_i(${incident.id})">Delete</a>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>
	<div>
		<table border="1" width="88%" id="F">
		<h3>PLAN INFO</h3>
			<tr>
				<td width="100"><b>plan_ID</b></td>
				<td width="100"><b>plan_type</b></td>
				<td width="100"><b>plan_description</b></td>
				<td width="100">Edit Item</td>
				<td width="100">Delete Item</td>
			</tr>
			<c:forEach items="${plan}" var="plan">
				<tr>
					<td>${plan.id}</td>
					<td>${plan.type}</td>
					<td>${plan.des}</td>
					<td>
						<a href="javascript:editConfirm_pl(${plan.id})">Edit</a>
					</td>
					<td>
						<a href="javascript:deleteConfirm_pl(${plan.id})">Delete</a>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>
</div>
</body>
</html>